<div id="formbox" >
	<div class="padding">
		<div id="feedback-success">
			<p>Der Benutzer wurde erfolgreich erstellt/bearbeitet. <a href="/<?= Zend_Registry::get('Zend_Locale') ?>/users/">(zurück zur Übersicht)</a></p>
		</div>
		<div id="feedback-error">
			<p>Beim Erstellen/Bearbeiten des Benutzer gab es einen Fehler. Bitte kontaktieren Sie den Administrator. <a href="/<?= Zend_Registry::get('Zend_Locale') ?>/users/">(zurück zur Übersicht)</a></p>
		</div>
		<form method="post" id="userform" name="userform" action="#">	
			<fieldset style="border:1px solid #ccc;">						
				<legend><?php echo $this->translate("Neuen Benutzer erstellen"); ?></legend>
				<div class="ffield">
					<label for="company" ><?php echo $this->translate("Firma"); ?></label>
					<input class="input" type="text" id="company" name="company" value="<?= $this->user['company']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="firstname" ><?php echo $this->translate("Vorname"); ?><sup>*</sup></label>
					<input class="input" type="text" id="firstname" name="firstname" value="<?= $this->user['firstname']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="lastname" ><?php echo $this->translate("Nachname"); ?><sup>*</sup></label>
					<input class="input" type="text" id="lastname" name="lastname" value="<?= $this->user['lastname']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="gender" ><?php echo $this->translate("Geschlecht"); ?><sup>*</sup></label>
					<select class="input" id="gender" name="gender">
						<option value="0" <?php if($this->user['gender'] == 0) echo 'selected="selected"'; ?>><?php echo $this->translate("unbekannt"); ?></option>
						<option value="1" <?php if($this->user['gender'] == 1) echo 'selected="selected"'; ?>><?php echo $this->translate("männlich"); ?></option>
						<option value="2" <?php if($this->user['gender'] == 2) echo 'selected="selected"'; ?>><?php echo $this->translate("weiblich"); ?></option>
					</select>
					<br />
				</div>
				<div class="ffield">
					<label for="mail" ><?php echo $this->translate("E-Mail Adresse")." ".$this->translate("(dient als Benutzername)"); ?><sup>*</sup></label>
					<input class="input" type="text" id="mail" name="mail" value="<?= $this->user['mail']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="rid" ><?php echo $this->translate("Rolle"); ?><sup>*</sup></label>
					<select class="input" id="rid" name="rid">
						<?php 
						foreach($this->roles as $role) { ?>
							<option value="<?php print($role['rid']); ?>" <?php if($this->user['rid'] == $role['rid']) echo 'selected="selected"'; ?>>
								<?php echo $this->translate($role['rolename']); ?>
							</option>
						<?php } ?>
					</select>
					<br />
				</div>
				<div class="ffield">
					<label for="streetaddress" ><?php echo $this->translate("Straße und Hausnummer"); ?></label>
					<input class="input" type="text" id="streetaddress" name="streetaddress" value="<?= $this->user['streetaddress']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="zipcode" ><?php echo $this->translate("PLZ"); ?><sup>*</sup></label>
					<input class="input" type="text" id="zipcode" name="zipcode" value="<?= $this->user['zipcode']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="city" ><?php echo $this->translate("Ort"); ?><sup>*</sup></label>
					<input class="input" type="text" id="city" name="city" value="<?= $this->user['city']; ?>" /> <br />
				</div>				
				<div class="ffield">
					<label for="show_ba" >Abweichende Rechnungsadresse angeben?</label>
					<input class="checkbox" type="checkbox" id="show_ba" name="show_ba" value="" <?php if($this->user['ba']) echo 'checked="checked"' ?> /> <br />
				</div>
				<hr class="separator_form" />
				<!-- Abweichende Rechnungsadresse Start -->
				<div id="billing_address">
					<div class="ffield">
						<label for="ba_company" ><?php echo $this->translate("Firma"); ?></label>
						<input class="input" type="text" id="ba_company" name="ba_company" value="<?= $this->user['ba_company']; ?>" /> <br />
					</div>
					<div class="ffield">
						<label for="ba_firstname" ><?php echo $this->translate("Vorname"); ?><sup>*</sup></label>
						<input class="input" type="text" id="ba_firstname" name="ba_firstname" value="<?= $this->user['ba_firstname']; ?>" /> <br />
					</div>
					<div class="ffield">
						<label for="ba_lastname" ><?php echo $this->translate("Nachname"); ?><sup>*</sup></label>
						<input class="input" type="text" id="ba_lastname" name="ba_lastname" value="<?= $this->user['ba_lastname']; ?>" /> <br />
					</div>
					<div class="ffield">
						<label for="ba_streetaddress" ><?php echo $this->translate("Straße und Hausnummer"); ?></label>
						<input class="input" type="text" id="ba_streetaddress" name="ba_streetaddress" value="<?= $this->user['ba_streetaddress']; ?>" /> <br />
					</div>
					<div class="ffield">
						<label for="ba_zipcode" ><?php echo $this->translate("PLZ"); ?><sup>*</sup></label>
						<input class="input" type="text" id="ba_zipcode" name="ba_zipcode" value="<?= $this->user['ba_zipcode']; ?>" /> <br />
					</div>
					<div class="ffield">
						<label for="ba_city" ><?php echo $this->translate("Ort"); ?><sup>*</sup></label>
						<input class="input" type="text" id="ba_city" name="ba_city" value="<?= $this->user['ba_city']; ?>" /> <br />
					</div>
					<hr class="separator_form" />
				</div>
				<!-- Abweichende Rechnungsadresse Ende -->
				<div class="ffield">
					<label for="phone_landline" ><?php echo $this->translate("Telefon (Festnetz)"); ?><sup>*</sup></label>
					<input class="input" type="text" id="phone_landline" name="phone_landline" value="<?= $this->user['phone_landline']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="phone_mobile" ><?php echo $this->translate("Telefon (Mobil)"); ?><sup>*</sup></label>
					<input class="input" type="text" id="phone_mobile" name="phone_mobile" value="<?= $this->user['phone_mobile']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="fax" ><?php echo $this->translate("Telefax"); ?><sup>*</sup></label>
					<input class="input" type="text" id="fax" name="fax" value="<?= $this->user['fax']; ?>" /> <br />
				</div>
				<div class="ffield">
					<label for="comment" ><?php echo $this->translate("Kommentar"); ?><sup>*</sup></label>
					<textarea class="input" id="comment" name="comment"><?= $this->user['comment']; ?></textarea><br />
				</div>
			
				<div class="submitbox" >
					<?php if($this->logged != true) { ?>
					<div class="reset">
						<p><a href="#" onclick="document.userform.reset(); return false"><?php echo $this->translate("Löschen"); ?></a></p>
					</div>
					<?php } ?>
					<div class="submit">
						<p><a id="submit-userform" href="#"><?php echo $this->translate("Abschicken"); ?></a></p>
					</div>
				</div>
				<input type="hidden" name="edittype" id="edittype" value="<?php echo $this->edittype; ?>" />
				<input type="hidden" name="uid" id="uid" value="<?php echo $this->user['uid']; ?>" />
			</fieldset>
			<div style="margin-top: 25px;"></div>  
		</form>
	</div>
</div>